FUNCTION

text.lastIndexOf

pure function lastIndexOf(text: text): integer

Deprecated (for removal): Use 'last_index_of' instead

Returns the index within this text of the last occurrence of the specified string, or -1 if not found.

Parameters

  • text — the substring for which to search

Since

0.9.0

Alias of text.last_index_of


pure function lastIndexOf(text: text, max: integer): integer

Deprecated (for removal): Use 'last_index_of' instead

Returns the index within this text of the last occurrence of the specified string, starting from the specified startIndex, or -1 if not found.

Parameters

  • text — the substring for which to search
  • max — the index from which to start the reverse-search

Since

0.9.0

Alias of text.last_index_of

© 2026 Chromia